$padding: 8rem;

@keyframes popup-backdrop-fade-in {
    0% {opacity: 0}
    100% {opacity: .03}
}

.popup {

    &:before {

        content: "";
        position: fixed;
        top:0rem;
        left:0;
        right:0;
        bottom:0;
        background: black;
        opacity: .3;
        // pointer-events: none;
        // animation: popup-backdrop-fade-in .25s forwards;

    }

    // backdrop-filter: blur(1rem);

    position: fixed;
    top:0;
    left:0;
    right:0;
    bottom:0;
    align-items:center;
    justify-content: center;
    z-index: 99999999;
    display: none;
    padding: 20rem;

    &.show {
        display: flex;
    }

    .popup-title {
        position: relative;
        min-height: var(--nav-height);
        height: var(--nav-height);
        display: flex;
        padding:0 $padding * 2 - 1;
        align-items: center;
        background: var(--color-ui-foreground);
        .title {
            flex:1;
            overflow: hidden;
        }
        > i {
            display: block;
            margin-right: 10rem;
        }
        &.closable {
            padding-right: 0;
        }
        .popup-label {
            flex:1;
            overflow: hidden;
        }
        .closer {
            height: var(--nav-height);
            width: var(--nav-height);
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            i {
                pointer-events: none;
            }
        }
    }
    .popup-wrapper {
        background: var(--color-background);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width:auto;
        position: relative;
        overflow: hidden;

        max-width: 100%;
        max-height: 100%;
        width: var(--width, 540rem);
        height: var(--height, auto);

        .popup-content {
            flex:1;
            width: auto;
            // padding: 2rem $padding $padding;
            min-height: 0;
            display: flex;
        }

        .message {
            white-space: normal;
            line-height: 150%;
            background: var(--color-background);
            padding: $padding;
            overflow-x: auto;
        }

    }
}
